﻿// (c)2010 David Schwarz (david.schwarz@live.com)
// This file is licensed under GNU GPL v2 license, see more at http://www.gnu.org/licenses/gpl-2.0.html
namespace Z2.Core
{

	#region Using

	using Microsoft.Xna.Framework;
	using Microsoft.Xna.Framework.Content;
	using Microsoft.Xna.Framework.Graphics;
using System;

	#endregion

	/// <summary>
	/// Základní abstraktní třída pro aplikování efektu
	/// </summary>
	public abstract class EffectBase : IDisposable
	{

		#region Members

		private GraphicsDeviceManager m_graphics;
		private ContentManager m_content;

		#endregion

		#region Constructor

		/// <summary>
		/// Konstruktor
		/// </summary>
		/// <param name="content"><see cref="ContentManager"/> obsahující textury a efekty</param>
		/// <param name="graphics"><see cref="GraphicsDeviceManager"/></param>
		protected EffectBase(ContentManager content, GraphicsDeviceManager graphics)
		{
			this.m_graphics = graphics;
			this.m_content = content;
		}

		#endregion

		#region Methods

		/// <summary>
		/// Metoda vykreslí tento efekt
		/// </summary>
		/// <param name="batch"><see cref="SpriteBatch"/></param>
		/// <param name="gameTime"><see cref="GameTime"/></param>
		public abstract void Draw(SpriteBatch batch, GameTime gameTime);

		#endregion

		#region Properties

		/// <summary>
		/// Vrací <see cref="ContentManager"/> obsahující data hry
		/// </summary>
		protected ContentManager Content
		{
			get
			{
				return this.m_content;
			}
		}

		/// <summary>
		/// Vrací <see cref="GraphicsDeviceManager"/>
		/// </summary>
		protected GraphicsDeviceManager Graphics
		{
			get
			{
				return this.m_graphics;
			}
		}

		#endregion

		#region IDisposable Members

		public virtual void Dispose()
		{
		}

		#endregion

	}
}
